import 'package:convergence_media/utils/fast_hash.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:isar/isar.dart';

part 'app_config_model.g.dart';
part 'app_config_model.freezed.dart';

@freezed
@Collection(ignore: {'copyWith'})
class AppConfigModel with _$AppConfigModel {
  const factory AppConfigModel({
    String? phoneNumber,
  }) = _AppConfigModel;

  const AppConfigModel._();

  int? get hashPhoneNumber =>
      phoneNumber == null ? null : fastHash(phoneNumber!);

  /// 确保整个软件只有一个 appConfigModel 类
  Id get id => 0;
}
